import java.util.Random;
import java.util.Scanner;
public class ketangtext {
    int sNo;
    String sName;
    String sSex;
    int sAge;
    int sJava;

    public ketangtext(int sNo, String sName, String sSex, int sAge, int sJava) {
        this.sNo = sNo;
        this.sName = sName;
        this.sSex = sSex;
        this.sAge = sAge;
        this.sJava = sJava;
    }

    public static void main(String[] args) {
        ketangtext[] studnet  = new ketangtext[5];
        ketangtext stu1 = new ketangtext(1,"zhangsan","男",20,97);
        ketangtext stu2 = new ketangtext(2,"lisi","女",20,88);
        ketangtext stu3 = new ketangtext(3,"wangwu","男",20,90);
        ketangtext stu4 = new ketangtext(4,"zhaoliu","男",20,95);
        ketangtext stu5 = new ketangtext(5,"liuqi","男",20,85);
        studnet[0] = stu1;
        studnet[1] = stu2;
        studnet[2] = stu3;
        studnet[3] = stu4;
        studnet[4] = stu5;

        int size = studnet.length;
        Double score = 0.0;
        int Max = 0;
        int Min = 100;
        for (int i = 0; i < size; i++) {
            score+=studnet[i].sJava;
            if(Max<=studnet[i].sJava){
                Max=studnet[i].sJava;
            }
            if(Min>=studnet[i].sJava){
                Min=studnet[i].sJava;
            }
        }
        Double Average = score/studnet.length;
        System.out.println("学生的平均成绩为:"+Average);
        System.out.println("学生中最高分为:"+Max);
        System.out.println("学生中最低分为:"+Min);
    }
}




/*public class ketangtext {
    public static void main(String[] args) {
        String show = "ABCD123";
        int key = 3;
        String ciphertext = encryption(show, key);
        System.out.println(ciphertext);
    }

    private static String encryption(String text, int key) {
        char[] chars = text.toCharArray();
        StringBuffer sb = new StringBuffer();
        for (char achar : chars) {
            int a =  achar + key;
            char newa = (char) a;
            sb.append(newa);
        }
        return sb.toString();
    }
}*/

